package com.polytech.diploma.StatAccumulator.Comparator;

import java.util.Comparator;

import com.polytech.diploma.OracleStat.SQLStatData;

public class MemoryStatComparator 
				extends StatComparator
				implements Comparator<SQLStatData> {

	@Override
	public int compare(SQLStatData statData1, SQLStatData statData2) {
		return compareWithConfidenceRange(statData1.getPersistentMemory()
												+ statData1.getRuntimeMemory(),
										  statData2.getPersistentMemory()
												+ statData2.getRuntimeMemory(),
				statData1.getUpdateFrequency(),
				statData2.getUpdateFrequency());
	}
}

